package zgc.demo.consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import zgc.demo.consumer.config.RibbonRuleConfig;
import zgc.demo.consumer.feignApi.GoodsFeignClient;

@SpringBootApplication
//作为eureka客户端启动
//@EnableEurekaClient
//作为nacos客户端的启动
@EnableDiscoveryClient
//启用客户端负载均衡，高版本可以不用写默人已开启配置,name属性指定为某某服务提供负载均衡，configuration属性指定负载均衡策略
@RibbonClient(name = "PROVIDER", configuration = RibbonRuleConfig.class)
//@作为feign的客户端启动
@EnableFeignClients
public class ConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class);
    }
}
